import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  // mode: 'history',
  routes: [{
      path: '*',
      redirect: '/'
    }, 
    {
      path: '',
      name: '',
      redirect: '/home',
      component: resolve => require(/* webpackChunkName: 'home' */ ['@/layout/index.vue'],resolve),
      children: [
        {
          path: '/home',
          component: resolve => require(/* webpackChunkName: 'home' */ ['@/views/home/index.vue'],resolve),
          name: '最新活动',
          meta: { title: '最新活动' },
        },

        // 产品服务
        {
          path: '/CDN',
          component: resolve => require(/* webpackChunkName: 'home' */ ['@/views/Product/CDN/index.vue'],resolve),
          name: '全球CDN',
          meta: { title: '全球CDN' },
        },
        {
          path: '/cloudSecurity',
          component: resolve => require(/* webpackChunkName: 'home' */ ['@/views/Product/CloudSecurity/index.vue'],resolve),
          name: '云安全',
          meta: { title: '云安全' },
        },
        {
          path: '/realTime',
          component: resolve => require(/* webpackChunkName: 'home' */ ['@/views/Product/RealTime/index.vue'],resolve),
          name: '视频与实时互动',
          meta: { title: '视频与实时互动' },
        },
        {
          path: '/basics',
          component: resolve => require(/* webpackChunkName: 'home' */ ['@/views/Product/Basics/index.vue'],resolve),
          name: '基础服务',
          meta: { title: '基础服务' },
        },
        
        // 解决方案
        {
          path: '/scheme/video',
          component: resolve => require(/* webpackChunkName: 'home' */ ['@/views/Scheme/Video/index.vue'],resolve),
          name: '音视频解决方案',
          meta: { title: '音视频解决方案' },
        },
        {
          path: '/scheme/game',
          component: resolve => require(/* webpackChunkName: 'home' */ ['@/views/Scheme/Game/index.vue'],resolve),
          name: '游戏行业解决方案',
          meta: { title: '游戏行业解决方案' },
        },
        {
          path: '/scheme/digital',
          component: resolve => require(/* webpackChunkName: 'home' */ ['@/views/Scheme/Digital/index.vue'],resolve),
          name: '数字人解决方案',
          meta: { title: '数字人解决方案' },
        },
        {
          path: '/scheme/chain',
          component: resolve => require(/* webpackChunkName: 'home' */ ['@/views/Scheme/Chain/index.vue'],resolve),
          name: '连锁零售解决方案',
          meta: { title: '连锁零售解决方案' },
        },
        // 支持与服务
        {
          path: '/support',
          component: resolve => require(/* webpackChunkName: 'home' */ ['@/views/Support/index.vue'],resolve),
          name: '支持与服务',
          meta: { title: '支持与服务' },
        },
        {
          path: '/mall',
          component: resolve => require(/* webpackChunkName: 'home' */ ['@/views/Mall/index.vue'],resolve),
          name: '云商城',
          meta: { title: '云商城' }, 
        },
        // 公司简介
        {
          path: '/intro',
          component: resolve => require(/* webpackChunkName: 'home' */ ['@/views/Intro/index.vue'],resolve),
          name: '公司简介',
          meta: { title: '公司简介' }, 
        },
        {
          path: '/ceshi',
          component: resolve => require(/* webpackChunkName: 'home' */ ['@/views/ceshi/index.vue'],resolve),
          name: 'cheshi',
          meta: { title: '测试' }, 
        },
      ]
    },

  ]
})
